<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Maven DeltaCoverage Plugin - </title>
    <style type="text/css" media="all">
      @import url("./css/maven-base.css");
      @import url("./css/maven-theme.css");
      @import url("./css/site.css");
    </style>
    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      </head>
  <body class="composite">
    <div id="banner">
                    <span id="bannerLeft">
    
            Maven DeltaCoverage Plugin
    
            </span>
                    <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
  
  
    
            <div class="xleft">
        Last Published: 2012-04-04
                      </div>
            <div class="xright">      
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
  
  
    
                   <h5>Overview</h5>
            <ul>
              
    <li class="none">
                    <a href="index.html">Introduction</a>
          </li>
              
    <li class="none">
                    <a href="plugin-info.html">Goals</a>
          </li>
              
    <li class="none">
              <strong>Usage</strong>
        </li>
              
    <li class="none">
                    <a href="faq.html">FAQ</a>
          </li>
          </ul>
              <h5>Examples</h5>
            <ul>
              
    <li class="none">
                    <a href="examples/example-one.html">Delta Coverage for current release</a>
          </li>
          </ul>
              <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="project-info.html">Project Information</a>
                </li>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="project-reports.html">Project Reports</a>
                </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
  
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Usage</h2>
<div class="section"><h3>Generating delta coverage</h3>
<p>To generate delta coverage report, typically execute:</p>
<div class="source"><pre> mvn deltacoverage:deltacoverage </pre>
</div>
<p>This will generate delta coverage report in xml and html format in the <tt>target</tt> directory. </p>
<ul><li><b>Note</b>: It is necessary that you already have a cobertura xml coverage report generated. The default path for coverage report is same as the default path of cobertura plugin <tt>$<a name="project.reporting.outputDirectory">project.reporting.outputDirectory</a>/cobertura/coverage.xml</tt> You can specify a different path by using <tt>delta.coverage.reportPath</tt> property. Typically, you may specify a different path by configuring the plugin in <tt>pom.xml</tt>:<div class="source"><pre>&lt;build&gt;
    &lt;plugins&gt;
        ...
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-deltacoverage-plugin&lt;/artifactId&gt;
            &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
            &lt;configuration&gt;
                &lt;coverageReport&gt;${project.build.outputDirectory}/cobertura/coverage.xml&lt;/coverageReport&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
        ...
    &lt;/plugins&gt;
&lt;build&gt;</pre>
</div>
</li>
<li><b>Note</b>: It is also necessary that you provide a <tt>baselineVersion</tt>. This is the CVS version/tag/branch with which the current code is compared to find the code changes and used for calculating the delta code coverage. You can specify the baseline version by specifying <tt>delta.baseline</tt> property, typically from the command line.</li>
</ul>
<p>Hence, you would typically execute following command:</p>
<div class="source"><pre> mvn cobertura:cobertura deltacoverage:deltacoverage -Ddelta.baseline=Root_branch_10_20</pre>
</div>
</div>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2012
    
          
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
